package com.yaorange.nongit.service.impl;

import java.util.List;
import com.yaorange.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yaorange.nongit.mapper.NjtAdminPrinterCertMapper;
import com.yaorange.nongit.domain.NjtAdminPrinterCert;
import com.yaorange.nongit.service.INjtAdminPrinterCertService;

/**
 * 打印机认证情况Service业务层处理
 * 
 * @author lzh
 * @date 2025-02-28
 */
@Service
public class NjtAdminPrinterCertServiceImpl implements INjtAdminPrinterCertService 
{
    @Autowired
    private NjtAdminPrinterCertMapper njtAdminPrinterCertMapper;

    /**
     * 查询打印机认证情况
     * 
     * @param printerId 打印机认证情况主键
     * @return 打印机认证情况
     */
    @Override
    public NjtAdminPrinterCert selectNjtAdminPrinterCertByPrinterId(Long printerId)
    {
        return njtAdminPrinterCertMapper.selectNjtAdminPrinterCertByPrinterId(printerId);
    }

    /**
     * 查询打印机认证情况列表
     * 
     * @param njtAdminPrinterCert 打印机认证情况
     * @return 打印机认证情况
     */
    @Override
    public List<NjtAdminPrinterCert> selectNjtAdminPrinterCertList(NjtAdminPrinterCert njtAdminPrinterCert)
    {
        return njtAdminPrinterCertMapper.selectNjtAdminPrinterCertList(njtAdminPrinterCert);
    }

    /**
     * 新增打印机认证情况
     * 
     * @param njtAdminPrinterCert 打印机认证情况
     * @return 结果
     */
    @Override
    public int insertNjtAdminPrinterCert(NjtAdminPrinterCert njtAdminPrinterCert)
    {
        njtAdminPrinterCert.setCreateTime(DateUtils.getNowDate());
        return njtAdminPrinterCertMapper.insertNjtAdminPrinterCert(njtAdminPrinterCert);
    }

    /**
     * 修改打印机认证情况
     * 
     * @param njtAdminPrinterCert 打印机认证情况
     * @return 结果
     */
    @Override
    public int updateNjtAdminPrinterCert(NjtAdminPrinterCert njtAdminPrinterCert)
    {
        return njtAdminPrinterCertMapper.updateNjtAdminPrinterCert(njtAdminPrinterCert);
    }

    /**
     * 批量删除打印机认证情况
     * 
     * @param printerIds 需要删除的打印机认证情况主键
     * @return 结果
     */
    @Override
    public int deleteNjtAdminPrinterCertByPrinterIds(Long[] printerIds)
    {
        return njtAdminPrinterCertMapper.deleteNjtAdminPrinterCertByPrinterIds(printerIds);
    }

    /**
     * 删除打印机认证情况信息
     * 
     * @param printerId 打印机认证情况主键
     * @return 结果
     */
    @Override
    public int deleteNjtAdminPrinterCertByPrinterId(Long printerId)
    {
        return njtAdminPrinterCertMapper.deleteNjtAdminPrinterCertByPrinterId(printerId);
    }
}
